package com.yonyou.pmclouds.procedureinspect.mapper;

import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.processinspect.entity.ProcedureInspectVO;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface ProcedureInspectMapper extends  BaseMapper<ProcedureInspectVO> {

	/**
	 * 
	 * 方法功能描述：根据项目主键查询工序报验。
	 * 
	 * <b>参数说明</b>
	 * @param pk_project
	 * @return
	 * @author zhangwce
	 * @time 2017年11月15日 上午11:01:00
	 */
	@Select("select * from pmbd_procedureinspect where dr = 0 and pk_project = #{pk_project} order by creationtime desc")
	@ResultMap("getMap")
    List<ProcedureInspectVO> queryPrcInspectByPrj(String pk_project);

	Integer selectRefByCode(@Param("code")String code, @Param("ids") String[] ids);

    List<ProcedureInspectVO> queryVosByParams(@Param("params") Map<String, Object> params);

	List<ProcedureInspectVO> queryByPks(@Param("pks") String[] pks);

	ProcedureInspectVO[] queryByCondition(@Param("pkProjects")String[] pkProjects,
										@Param("creators") String[] creators,
										@Param("startDate") String startDate,
										@Param("endDate") String endDate,
										@Param("billStatus") int[] billStatus,
										@Param("start") int start,
										@Param("size") int size);
	int countByCondition(@Param("pkProjects")String[] pkProjects,
						 @Param("creators") String[] creators,
						 @Param("startDate") String startDate,
						 @Param("endDate") String endDate,
						 @Param("billStatus") int[] billStatus);
}
